export const stringToObject = (data: string) => {
  const obj: any = {}
  // data = data.slice(1, data.length - 1)
  data.split('&').forEach((item) => {
    const arr = item.split('=')
    obj[arr[0]] = arr[1].replace(/%/g, ' ')
  })
  return obj
}
